/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import javax.persistence.Entity;

/**
 *
 * @author Andy
 */
@Entity(name="RawMaterialsLocation")
public class RawMaterialsLocationEntity extends LocationEntity implements Serializable {
    //String type;
    int capacityKg;
    int usageKg;
    int remainingKg;
    int toAddKg;
    int showBarKg;

    public RawMaterialsLocationEntity() {
        super();
        super.setType("RM");
    }
//
//    public String getType() {
//        return type;
//    }
//
//    public void setType(String type) {
//        this.type = type;
//    }

    public int getRemainingKg() {
        remainingKg = capacityKg - usageKg;
        return remainingKg;
    }

    public void setRemainingKg(int remainingKg) {
        this.remainingKg = remainingKg;
    }

    public int getShowBarKg() {
        showBarKg = usageKg+toAddKg;
        showBarKg = showBarKg/10;
        return showBarKg;
    }

    public void setShowBarKg(int showBarKg) {
        this.showBarKg = showBarKg;
    }

    public int getToAddKg() {
        return toAddKg;
    }

    public void setToAddKg(int toAddKg) {
        this.toAddKg = toAddKg;
    }

    public int getCapacityKg() {
        return capacityKg;
    }

    public void setCapacityKg(int capacityKg) {
        this.capacityKg = capacityKg;
    }

    public int getUsageKg() {
        return usageKg;
    }

    public void setUsageKg(int usageKg) {
        this.usageKg = usageKg;
    }
}
